package org.biodas.jdas.exceptions;

public class DASClientException extends Exception {
    private final int status;
	public DASClientException(String message){
	        super (message);
                this.status=0;
	    }

	    public DASClientException(String message, Throwable cause){
	        super (message, cause);
                this.status=0;
	    }
            
            /**
             * Add the http status code returned to the exception
             * @param message
             * @param cause
             * @param status http status - client can decide what it wants to do with this error based on the http status
             */
             public DASClientException(String message, Throwable cause, int status){
	        super (message, cause);
                this.status=status;
	    }
            
            /**
             * get the http status code
             * @return status code
             */
            public int  getHttpStatus(){
                return this.status;
            }
}
